home *** CD-ROM | disk | FTP | other *** search
- Path: news.acadia.net!usenet
- From: Nickii Sonnenberg <nickii@aerohydro.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Derived Class Woes
- Date: Wed, 03 Apr 1996 15:06:28 -0400
- Organization: AeroHydro
- Message-ID: <3162CC34.231B@aerohydro.com>
- References: <paulg53-0104960929470001@paulg53.escape.com>
- NNTP-Posting-Host: bhb25.acadia.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- Paul A. Gusmorino wrote:
- >
- > I'm having trouble with some code I'm writing. All the class and member
- > function names have been changed to protect the innocent, but the prblem
- > is real :-) I have a class, let's call it TApp. TApp has two member
- > functions Run and DoSomething. Run is just a big loop that keeps calling
- > DoSomething until the user quits. I've derived a class from TApp called
- > MyApp. In MyApp I've written a new DoSomething. My problem is that when I
- > call MyApp's Run (which was inherited from TApp), then it calls TApp's Run
- > and NOT MyApp's Run. Is there a way to solve the problem?
- >
- > Thanks a million,
- > Paul A. Gusmorino 3rd <paulg53@escape.com>
-
- Did you write the TApp class? If so, you need to make the DoSomething
- virtual.
-